from tortoise import BaseDBAsyncClient


async def upgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE "live_data" RENAME COLUMN "user_id" TO "sec_id";
        ALTER TABLE "live_data" ADD "uid" CHAR(36) NOT NULL;"""


async def downgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE "live_data" RENAME COLUMN "sec_id" TO "user_id";
        ALTER TABLE "live_data" DROP COLUMN "uid";"""
